package com.example.vo.req;

import com.example.anno.EnumValidAnno;
import com.example.anno.UserNameExistValidAnno;
import com.example.constant.UserTypeEnum;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

@Data
public class SysUserVo {
    private String id;
    private String name;
    @NotEmpty(message = "{user.userNameNotEmpty}")
    @Length(min = 3, max = 20)
    @UserNameExistValidAnno
    private String userName;
    @NotEmpty
    private String nickName;

    @EnumValidAnno(enumValue = UserTypeEnum.class)
    private int userType;
}
